package com.zerui.manager.openplan.gateway;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zerui.cola.dto.Response;
import com.zerui.manager.openplan.OpenPlan;
import com.zerui.manager.openplan.OpenPlanDevice;
import com.zerui.manager.openplan.OpenPlanImplement;
import com.zerui.manager.openplan.OpenPlanImplementTask;
import com.zerui.manager.web.cmd.OpenPlanDeviceAddCmd;
import com.zerui.manager.web.cmd.OpenPlanQryCmd;

import java.util.List;
import java.util.Map;

/**
 * @Author wh
 * @create_time 2023-08-23 11:07
 */
public interface OpenPlanGateWay {

    Response addOpenPlan(OpenPlan openPlan);

    OpenPlan selectById(Long id);

    Response updateById(OpenPlan openPlan);

    Response deleteById(Long id);

    Page<OpenPlan> getPageList(OpenPlanQryCmd openPlanQryCmd);

    void addBatchImplements(List<OpenPlanImplement> implementList);

    void deleteImplementByPlanId(Long id);

    void executeTask(Long implementId);

    List<OpenPlanImplementTask> selectImplementByTime(String now);

    Map<Long, Long> getOpenPlanDeviceMapById(List<Long> deviceIds);

    void addBatchOpenPlanDevice(List<OpenPlanDevice> openPlanDevices);

    Response deleteOpenPlanDevice(OpenPlanDeviceAddCmd openPlanDeviceAddCmd);

    void deleteDeviceByPlanId(Long id);

    List<OpenPlanImplement> selectImplementById(Long id);

    void deleteDeviceById(Long deviceId);
}
